local skel = fk.CreateSkill {
  name = "efengqi__fangzhu",
}

Fk:loadTranslationTable{
  ["efengqi__fangzhu"] = "放逐",
  [":efengqi__fangzhu"] = "当你受到伤害后，你可以令一名其他角色翻面，然后其摸X张牌（X为你已损失的体力值）。",

  ["#efengqi__fangzhu-choose"] = "放逐：你可以令一名其他角色翻面，然后其摸%arg张牌",

  ["$efengqi__fangzhu1"] = "死罪可免，活罪难赦！",
  ["$efengqi__fangzhu2"] = "给我翻过来！",
}

skel:addEffect(fk.Damaged, {
  anim_type = "masochism",
  on_cost = function(self, event, target, player, data)
    local tos = player.room:askToChoosePlayers(player, {
      min_num = 1, max_num = 1, skill_name = skel.name, targets = player.room:getOtherPlayers(player),
      prompt = "#efengqi__fangzhu-choose:::"..player:getLostHp(),
    })
    if #tos > 0 then
      event:setCostData(self, {tos = tos})
      return true
    end
  end,
  on_use = function(self, event, target, player, data)
    local to = event:getCostData(self).tos[1]
    to:turnOver()
    if not to.dead and player:getLostHp() > 0 then
      to:drawCards(player:getLostHp(), skel.name)
    end
  end,
})



return skel
